package com.chenglu.android.goodsinfo.infoutils;

import android.content.Context;
import android.content.Intent;
import android.widget.ImageView;
import android.widget.TextView;

import com.chenglu.android.R;
import com.chenglu.android.common.utils.GlideUtils;
import com.chenglu.android.goodsinfo.GoodsInfoActivity;
import com.chenglu.android.goodsinfo.GoodsRestantInfoActivity;
import com.chenglu.android.store.StoreActivityNew;

/**
 * @author: lyj
 * @Created: by Copyright 2023/10/11 Guangzhou Hongma Technology Co., Ltd. All rights reserved.
 * @Description：订单详情的跳转
 * */
public class GoodsInfoUtils {

    public static void goodsInfo(Context context, String id,int shopsTypeId) {
        Intent intent = new Intent(context, GoodsInfoActivity.class);
        intent.putExtra(GoodsInfoActivity.ID, id);
        intent.putExtra(GoodsInfoActivity.SHOPSTYPEID, shopsTypeId);
        context.startActivity(intent);

    }

    public static void goodsRestantInfo(Context context, String id,int shopsTypeId) {
        Intent intent = new Intent(context, GoodsRestantInfoActivity.class);
        intent.putExtra(GoodsInfoActivity.ID, id);
        context.startActivity(intent);

    }

    public static void goodsStoreInfo(Context context, String id,int shopsTypeId) {
        Intent intent = new Intent(context, StoreActivityNew.class);
        intent.putExtra(StoreActivityNew.TENANTID, id);
        intent.putExtra(StoreActivityNew.SHOPSTYPEID, shopsTypeId);
        context.startActivity(intent);

    }

    public static void setTypeShopsId(Context context,TextView textView, int shopTypeId , ImageView imageView) {
        switch (shopTypeId){
            case 1:
                textView.setText("商超");
                GlideUtils.setImageView(context,"https://templatefile.slmykj.com/myfiles/cart/shop_cart_icon_mall.png",imageView);
                break;
            case 2:
                textView.setText("餐饮");
                GlideUtils.setImageView(context,"https://templatefile.slmykj.com/myfiles/cart/shop_cart_icon_catering.png",imageView);
                break;
            case 3:
                textView.setText("美业");
                GlideUtils.setImageView(context,"https://templatefile.slmykj.com/myfiles/cart/shop_cart_icon_keep_healthy.png",imageView);
                break;
            case 4:
                textView.setText("教育");
                GlideUtils.setImageView(context,"https://templatefile.slmykj.com/myfiles/cart/shop_cart_icon_education.png",imageView);
                break;
            case 5:
                textView.setText("装修");
                break;
            case 6:
                textView.setText("农业");
                break;
            case 7:
                textView.setText("酒店");
                break;
            case 8:
                textView.setText("便利店");
                GlideUtils.setImageView(context,"https://templatefile.slmykj.com/myfiles/cart/shopping_cart_convenience.png",imageView);
                break;
            case 9:
                textView.setText("药店");
                GlideUtils.setImageView(context,"https://templatefile.slmykj.com/myfiles/cart/shopping_cart_pharmacy.png",imageView);
                break;
            case 10:
                textView.setText("孕育");
                GlideUtils.setImageView(context,"https://zhtest.slmykj.com/myfiles/breed/shopping_cart_icon_breed.png",imageView);
                break;
            case 999:
                textView.setText("公共平台");
                break;
        }
    }

    public static void setTypeShopsImageView(Context context,int shopTypeId , ImageView imageView) {
        switch (shopTypeId){
            case 1:

                GlideUtils.setImageView(context,"https://templatefile.slmykj.com/myfiles/cart/shop_cart_icon_mall.png",imageView);
                break;
            case 2:

                GlideUtils.setImageView(context,"https://templatefile.slmykj.com/myfiles/cart/shop_cart_icon_catering.png",imageView);
                break;
            case 3:

                GlideUtils.setImageView(context,"https://templatefile.slmykj.com/myfiles/cart/shop_cart_icon_keep_healthy.png",imageView);
                break;
            case 4:

                GlideUtils.setImageView(context,"https://templatefile.slmykj.com/myfiles/cart/shop_cart_icon_education.png",imageView);
                break;
            case 5:

                break;
            case 6:

                break;
            case 7:

                break;
            case 8:

                GlideUtils.setImageView(context,"https://templatefile.slmykj.com/myfiles/cart/shopping_cart_convenience.png",imageView);
                break;
            case 9:

                GlideUtils.setImageView(context,"https://templatefile.slmykj.com/myfiles/cart/shopping_cart_pharmacy.png",imageView);
                break;
            case 10:

                GlideUtils.setImageView(context,"https://zhtest.slmykj.com/myfiles/breed/shopping_cart_icon_breed.png",imageView);
                break;
            case 999:
                break;
        }
    }
}
